<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>首页</title>
    <base href="http://localhost:8080/lishuoboy_javaweb_war_exploded/">
</head>
<body>
<div>
    <% if (request.getSession().isNew()) {  // 超时登出（被动）
        response.sendRedirect("session_login.html");
    } else {%>
    <div>
        <h2>${sessionScope.user.name} 已登录 <a href="SessionServlet?action=logout">退出登录</a></h2>
        <h2>5秒无刷新session超时自动退出</h2>
    </div>
    <% }%>
</div>
</body>
</html>